home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4734 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: ix.netcom.com!netnews
  2. From: a1s@ix.netcom.com (Andrew Snyder)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Passing Parameters on Exit?
  5. Date: Tue, 06 Feb 1996 21:59:29 GMT
  6. Organization: Netcom
  7. Message-ID: <4f88lg$sdd@ixnews2.ix.netcom.com>
  8. References: <4f69hl$sp2@nic.umass.edu>
  9. NNTP-Posting-Host: ix-har5-19.ix.netcom.com
  10. X-NETCOM-Date: Tue Feb 06 11:03:12 AM PST 1996
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. ksnella@twain.oit.umass.edu (Kenneth A Snella) wrote:
  14.  
  15. >Is there any way to pass parameters out of a C program?  I'm trying to 
  16. >build a system that exits a C program and executes other programs (not 
  17. >always C ones), but need to pass a couple of important items to the batch 
  18. >file.  Some mailers and BBS's seem to be able to do this, is there a 
  19. >way?  It seems as though a call to the Borland C++ 3.1 function system() 
  20. >would be able to SET an environment parameter, but it doesn't seem to 
  21. >work.  Any suggestions?
  22.  
  23. you need to write to a file or a pipe.  The only things you can pass
  24. out of a C program is the int return from main or the enviroment to
  25. children processes.
  26. Andrew Snyder
  27. a1s@ix.netcom.com
  28. char disclaimer[] = {'\0'}; /* I'm on cash net */
  29.  
  30.